<template>
	<view class="pay-result">
		<view class="content">
			<image class="icon" src="/static/gouxuan.png" mode=""></image>
			<text class="text">支付成功</text>
		</view>
		<view class="tools">
			<button class="btn btn-line" @click="checkOrder" >查看订单</button>
			<button class="btn btn-yellow" @click="goBack">回到首页</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			type: 'success' //结果类型 success fail
		};
	},
	methods: {
		checkOrder(){
			// 查看订单
			uni.reLaunch({
				url:"/pages/order/order-list?currentTab=2",
			})
		},
		goBack(){
			// 回到首页
			uni.switchTab({
				url:"/pages/main/home"
			})
		}
	},
	onLoad(option) {
		if (option.type) this.type = option.type;
	}
};
</script>

<style lang="scss" scoped>
.pay-result {
	.content{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 600rpx;
		.icon{
			width: 200rpx;
			height: 200rpx;
			margin-bottom: 50rpx;
		}
		.text{
			color: #3876FC;
			font-size: 34rpx;
			font-weight: bolder;
		}
	}
	.tools{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 50rpx;
		.btn{
			width: 310rpx;
			padding: 20rpx 0rpx;
		}
	}
}
</style>
